x86/svm: Introduce svm_emul_swint_injection()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 30 Mar 2017 17:27:07 +0000 (17:27 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Apr 2017 17:12:59 +0000 (18:12 +0100)
commit897d59a426f19f4099cd34feb0a8da9122810364
treee428ac5ca153bb07eb4d395a41386e0531c0871d
parentce07f6d8cb580a9dbb744f7e92073777b79af22a
x86/svm: Introduce svm_emul_swint_injection()

Software events require emulation in some cases on AMD hardware.  Introduce
svm_emul_swint_injection() to perform this emulation if necessary in
svm_inject_event(), which will cope with any sources of event, rather than
just those coming from x86_emulate().

This logic mirrors inject_swint() in the x86 instruction emulator.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/svm/svm.c